<template>
  <div class="person_homeView">
    <el-container>
      <el-aside width="260px">
        <el-menu :default-active="$route.path" active-text-color="#20567a" router="">
          <div v-if="!expand" class="nav_back" @click="$router.push('/caseorder')">
            <i class="el-icon-arrow-left" style="color: #4884e5"></i>
            <span class="title">{{ $t('personInfo.xinxi1') }}</span>
          </div>
          <!-- <el-menu-item index="/">
                            <i class="el-icon-arrow-left" style="color:#4884E5;"></i>
                            <span slot="title" style="color:#4884E5;">{{ $t('add.add153') }}</span>
                        </el-menu-item> -->
          <el-menu-item index="/personinfo">
       
              <span slot="title">{{ $t('routers.personInfo') }}</span>
           
          </el-menu-item>
          <el-menu-item index="/account">
            <!-- <i class="el-icon-document"></i> -->
            <span slot="title">{{ $t('routers.personAccount') }}</span>
          </el-menu-item>
          <el-menu-item v-if="user_superAdmin != 1" index="/preference">
            <!-- <i class="el-icon-document"></i> -->
            <span slot="title">{{ $t('routers.personPre') }}</span>
          </el-menu-item>
          <el-menu-item v-if="user_superAdmin != 1" index="/organizationinfo">
            <!-- <i class="el-icon-setting"></i> -->
            <span slot="title">{{ $t('routers.personOriginationInfo') }}</span>
          </el-menu-item>
        </el-menu>
      </el-aside>
      <el-main>
        <router-view />
      </el-main>
    </el-container>
  </div>
</template>

<script>
export default {
  name: 'Home',

  data() {
    return {
      menuList: [
        // 返回主页
        {
          icon: '',
          title: this.$t('personInfo.xinxi2'),
          selectedIcon: '',
          selected: false,
        },
        {
          icon: '',
          title: this.$t('personInfo.xinxi3'),
          selectedIcon: '',
          selected: false,
        },
        {
          icon: '',
          title: this.$t('personInfo.xinxi4'),
          selectedIcon: '',
          selected: false,
        },
        {
          icon: '',
          title: this.$t('personInfo.xinxi5'),
          selectedIcon: '',
          selected: false,
        },
      ],
      form: {
        origination: '',
      },
      circleUrl: '',
      expand: false,
      user_superAdmin: '', // 用户角色 后期更改
    };
  },

  created() {
    if (localStorage.getItem('tg_expand')) {
      this.expand = localStorage.getItem('tg_expand');
    }
    this.user_superAdmin = localStorage.getItem('user_superAdmin');
  },

  methods: {},
};
</script>

<style lang="scss">
.person_homeView {
  height: 100%;

  .el-header {
    // background-color: #B3C0D1;
    color: #333;
    // text-align: center;
    // line-height: 60px;
  }

  .el-aside {
    background-color: transparent;
    // color: #333;
    text-align: center;

    // padding-left: 12px;
    // line-height: 200px;
    .el-menu {
      border: none;
    }
  }

  .el-main {
    background-color: #f8f8f8;
    // color: #333;
    text-align: left;
    padding: 10px !important;
  }

  .el-container {
    height: 100%;
  }

  .nav_back {
    margin-top: 15px;
    padding-left: 5px;
    cursor: pointer;

    .title {
      font-size: 14px;
      font-weight: 400;
      line-height: 22px;
      color: #4884e5;
    }
  }
}

.el-menu-item.is-active {
  background-color: #e6ecf0 !important;
}
</style>
